// Copyright (c) 2009 Mike Haight, Andy Kipp
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

#pragma once

#include "stdafx.h"
#include "Object.h"
#include "Location.h"
#include "Size.h"
#include "Rectangle.h"

namespace HandBanana { namespace Game
{
    /// <summary>
    /// Abstract class representing any object in a Scene
    /// </summary>
    class Actor : public HandBanana::Core::Object
    {
    // Constructor
    public:
        /// <summary>
        /// Create instance of the Actor class
        /// </summary>
        Actor(void);


    // Destructor
    public:
        /// <summary>
        /// Destory instance of the Actor class
        /// </summary>
        ~Actor(void);


    // Public Properties
    public:
        /// <summary>
        /// Gets the Location of the Actor
        /// </summary>
        HandBanana::Core::Location Location(void) const;

        /// <summary>
        /// Sets the Location of the Actor
        /// </summary>
        void Location(const HandBanana::Core::Location& value);

        /// <summary>
        /// Gets the Size of the Actor
        /// </summary>
        HandBanana::Core::Size Size(void) const;

        /// <summary>
        /// Sets the Size of the Actor
        /// </summary>
        void Size(const HandBanana::Core::Size& value);

        /// <summary>
        /// Gets the CollisionOffset of the Actor
        /// </summary>
        HandBanana::Core::Rectangle CollisionOffset(void) const;

        /// <summary>
        /// Sets the CollisionOffset of the Actor
        /// </summary>
        void CollisionOffset(const HandBanana::Core::Rectangle& value);


    // Public Methods
    public:


    // IRenderable Methods
    public:
        ///// <summary>
        ///// Implements the IRenderable::Update method
        ///// </summary>
        //virtual void Update(void) = NULL;

        ///// <summary>
        ///// Implements the IRenderable::GetSprites method
        ///// </summary>
        //virtual void GetSprites(List<Sprite^>^ argSpriteList) = NULL;


    // Protected Methods
    protected:
        /// <summary>
        /// Return the Rectangle that defines the collidable area
        /// </summary>
        virtual HandBanana::Core::Rectangle CalculateCollisionRectangle(void) const;

        /// <summary>
        /// Move the Actor in the given velocity
        /// </summary>
        virtual bool Move(const HandBanana::Core::Location& argVelocity);


    // Private Data Members
    private:
        HandBanana::Core::Location                  mLocation;
        HandBanana::Core::Size                      mSize;
        HandBanana::Core::Rectangle                 mOffset;


    };
} }
